home *** CD-ROM | disk | FTP | other *** search
/ Shareware Grab Bag / Shareware Grab Bag.iso / 005 / epistat.arc / EPISTAT.BAS (.txt) < prev    next >
Encoding:
GW-BASIC  |  1983-08-18  |  8.8 KB  |  130 lines

  1. 1  REM                  INTRODUCTION TO EPISTAT
  2. 2  REM             Written by Tracy L. Gustafson, M.D.
  3. 3  REM            Round Rock, Texas. Version 2.0, 1982
  4. 5  DEF SEG=&H40
  5. 7  A=PEEK(&H17): IF NOT(A AND &H20) THEN POKE &H17,(A AND (NOT &H20)) OR &H20
  6. 10  DEF SEG: KEY OFF: WIDTH 80: SCREEN 0,0: COLOR 0,7,0: CLS
  7. 11  PRINT TAB(14);"THENTHENTHENTHENTHENTHENTHENTHENTHENTHENTHENTHENTHENUSER-SUPPORTED SOFTWARETHENTHENTHENTHENTHENTHENTHENTHENTHENTHENTHENTHENTHEN"
  8. 15  PRINT: PRINT: PRINT TAB(8);STRING$(61,178)
  9. 20  PRINT TAB(8);"WENDWEND                                                         WENDWEND"
  10. 21  PRINT TAB(8);"WENDWEND      EPISTAT is a statistical package distributed       WENDWEND"
  11. 22  PRINT TAB(8);"WENDWEND  free of charge to persons providing a blank diskette.  WENDWEND"
  12. 23  PRINT TAB(8);"WENDWEND    If you have used the program and found it useful,    WENDWEND"
  13. 24  PRINT TAB(8);"WENDWEND  your contribution ($25 suggested) will be appreciated. WENDWEND"
  14. 25  PRINT TAB(8);"WENDWEND                                                         WENDWEND"
  15. 26  PRINT TAB(8);"WENDWEND    Send contributions to:                               WENDWEND"
  16. 27  PRINT TAB(8);"WENDWEND              Tracy L. Gustafson, M.D.                   WENDWEND"
  17. 28  PRINT TAB(8);"WENDWEND              1705 Gattis School Road                    WENDWEND"
  18. 29  PRINT TAB(8);"WENDWEND              Round Rock, Texas  78664                   WENDWEND"
  19. 30  PRINT TAB(8);"WENDWEND                                                         WENDWEND"
  20. 31  PRINT TAB(8);"WENDWEND    All users may copy and distribute these programs     WENDWEND"
  21. 32  PRINT TAB(8);"WENDWEND                     provided:                           WENDWEND"
  22. 33  PRINT TAB(8);"WENDWEND  1.)  The programs are not altered in any way.          WENDWEND"
  23. 34  PRINT TAB(8);"WENDWEND  2.)  No fee is charged for copying or distribution.    WENDWEND"
  24. 35  PRINT TAB(8);"WENDWEND                                                         WENDWEND"
  25. 40  PRINT TAB(8);STRING$(61,178): FOR Z=1 TO 4: PLAY "MB O=Z; L18 CEGB-": NEXT
  26. 45  FOR Z=4 TO 2 STEP -1: PLAY "MB O=Z; L14 AFC.": NEXT: PLAY "MB O1 L16 B L6 B-A L2 F"
  27. 48  FOR Z=1 TO 10000: NEXT: COLOR 7,0,1
  28. 50  CLS: PRINT TAB(21);"KEY";STRING$(29,205);"CLOSE"
  29. 55  PRINT TAB(21);"OPEN EPISTAT STATISTICAL PACKAGE OPEN"
  30. 60  PRINT TAB(21);"SCREEN";STRING$(29,205);"LOAD"
  31. 75  PRINT: PRINT: PRINT TAB(5);"Would you like to:": PRINT
  32. 80  PRINT TAB(15);"1.)  List the tests and functions available.": PRINT
  33. 85  PRINT TAB(15);"2.)  Determine the best test for your problem.": PRINT
  34. 90  PRINT TAB(15);"3.)  Exit to run a specific test program.": PRINT: PRINT
  35. 95  PRINT TAB(20);: INPUT "Enter your choice:    ",ASUB
  36. 100  IF ABS(2-ASUB)>1.01 THEN BEEP: GOTO 95
  37. 105  ON ASUB GOTO 110,225,520
  38. 110  CLS: PRINT TAB(25);"TESTS AVAILABLE IN EPISTAT"
  39. 112  PRINT TAB(25);STRING$(26,205): PRINT
  40. 115  PRINT TAB(29);"PROGRAM";TAB(69);"PROGRAM"
  41. 120  PRINT "TEST OR FUNCTION";TAB(30);"NAME";TAB(42);"TEST OR FUNCTION";TAB(70);"NAME"
  42. 122  PRINT "SOUNDSOUNDSOUNDSOUNDSOUNDSOUNDSOUNDSOUNDSOUNDSOUNDSOUNDSOUNDSOUNDSOUNDSOUNDSOUND";TAB(29);"SOUNDSOUNDSOUNDSOUNDSOUNDSOUNDSOUNDSOUND";TAB(42);"SOUNDSOUNDSOUNDSOUNDSOUNDSOUNDSOUNDSOUNDSOUNDSOUNDSOUNDSOUNDSOUNDSOUNDSOUNDSOUND";TAB(69);"SOUNDSOUNDSOUNDSOUNDSOUNDSOUNDSOUND"
  43. 125  PRINT "Analysis of variance........ANOVA*";TAB(42);"Mean and Median............DATA-ONE*"
  44. 130  PRINT "Bayes' theorem..............BAYES";TAB(42);"Normal distribution........NORMAL*"
  45. 135  PRINT "Binomial distribution.......BINOMIAL";TAB(42);"Poisson distribution.......POISSON"
  46. 140  PRINT "Chi-square test.............CHISQR";TAB(42);"Random sample generator....RANDOMIZ"
  47. 145  PRINT "Correlation coefficient.....CORRELAT*";TAB(42);"Rank correlation...........RANKTEST*"
  48. 150  PRINT "F Distribution..............ANOVA*";TAB(42);"Rank sum test..............RANKTEST*"
  49. 155  PRINT "Fisher's exact test.........FISHERS";TAB(42);"Rates adjusted.............RATEADJ*"
  50. 160  PRINT "Graph histogram.............HISTOGRM*";TAB(42);"Sample size determination..SAMPLSIZ"
  51. 165  PRINT "Linear regression...........LNREGRES*";TAB(42);"Signed rank test...........RANKTEST*"
  52. 170  PRINT "Mantel-Haenszel Chi-square..MHCHISQR";TAB(42);"Standard deviation.........DATA-ONE*"
  53. 175  PRINT "Mantel-Haenszel for";TAB(42);"Student's T-test...........T-TEST*"
  54. 180  PRINT TAB(3);"multiple controls/case....MHCHIMLT*";TAB(42);"T distribution.............T-TEST*"
  55. 185  PRINT "McNemar's test..............MCNEMAR";TAB(42);"Transfer data"
  56. 190  PRINT TAB(44);"between two datafiles....FILETRAN*"
  57. 200  PRINT: PRINT TAB(5);"*Starred programs can evaluate data entered and saved using DATA-ONE."
  58. 210  PRINT: PRINT TAB(20);"Press any key to return to main menu:";
  59. 220  A$=INKEY$: IF A$="" THEN 220 ELSE 50
  60. 225  CLS: PRINT TAB(18);"DETERMINING THE BEST STATISTICAL TEST"
  61. 227  PRINT TAB(18);STRING$(37,205): PRINT: PRINT
  62. 230  PRINT TAB(5);"Do you want to consider:": PRINT
  63. 235  PRINT TAB(20);"1.)  Tests for a single sample.": PRINT
  64. 240  PRINT TAB(20);"2.)  Tests for 2 or more samples.": PRINT
  65. 245  PRINT TAB(20);"3.)  Other statistical functions.": PRINT
  66. 250  PRINT TAB(20);"4.)  Return to main menu.": PRINT: PRINT
  67. 255  PRINT TAB(25);: INPUT "Enter your choice:   ",ASUB
  68. 260  IF ABS(ASUB-2.5)>1.51 THEN BEEP: GOTO 255
  69. 265  ON ASUB GOTO 270,315,480,50
  70. 270  CLS: PRINT TAB(25);"TESTS FOR A SINGLE SAMPLE": PRINT
  71. 275  PRINT "The following tests compare an observed number": PRINT TAB(37);"to the expected (population) rate:": PRINT: PRINT
  72. 280  PRINT "[BINOMIAL] : The Binomial distribution applies when a dichotomous variable": PRINT TAB(14);"has an equal probability of occurring on each of N trials.": PRINT
  73. 285  PRINT "[POISSON] :  The Poisson distribution applies when a dichotomous variable": PRINT TAB(14);"has a known probability of occurring on each trial,": PRINT TAB(14);"but the number of trials is not known.": PRINT
  74. 290  PRINT "[NORMAL] :   The Normal distribution applies to continuous and dichotomous": PRINT TAB(14);"variables when the sample size is >30 and normally distributed."
  75. 295  PRINT TAB(14);"Specifically used when comparing a sample mean": PRINT TAB(14);"with a population mean.": PRINT
  76. 305  PRINT: PRINT TAB(20);"Press any key to return to menu:"
  77. 310  A$=INKEY$: IF A$="" THEN 310 ELSE 225
  78. 315  CLS: PRINT TAB(23);"TESTS FOR TWO OR MORE SAMPLES": PRINT: PRINT
  79. 320  INPUT "Is the variable under consideration probably normally distributed? (Y or N)  ",A$
  80. 325  IF A$="Y" OR A$="y" THEN 355 ELSE IF A$="N" OR A$="n" THEN 330 ELSE BEEP: GOTO 320
  81. 330  PRINT: PRINT: PRINT "[RANKTEST] includes three tests:": PRINT: PRINT TAB(10);"1.) The Signed Rank Test compares the medians of paired samples.": PRINT
  82. 335  PRINT TAB(10);"2.) Spearman's Rank Correlation evaluates the correlation": PRINT TAB(14);"between paired variables.": PRINT
  83. 340  PRINT TAB(10);"3.) The Rank Sum Test compares the medians of independent samples."
  84. 345  PRINT: PRINT: PRINT TAB(20);"Press any key to return to menu:"
  85. 350  A$=INKEY$: IF A$="" THEN 350 ELSE 225
  86. 355  PRINT: PRINT TAB(24);"NORMALLY DISTRIBUTED SAMPLES": PRINT: PRINT TAB(12);
  87. 360  INPUT"Are these samples paired (P) or independent (I)?   ",A$
  88. 365  IF A$="P" OR A$="p" THEN 370 ELSE IF A$="i" OR A$="I" THEN 410 ELSE BEEP: GOTO 360
  89. 370  PRINT: PRINT: PRINT: PRINT "[T-TEST] :   The paired T-Test compares means of continuous variables.": PRINT
  90. 375  PRINT "[LNREGRES]:  Linear Regression analysis evaluates linear association.": PRINT
  91. 380  PRINT "[CORRELAT]:  Pearson's correlation coefficient evaluates correlation.": PRINT
  92. 385  PRINT "[MCNEMAR] :  McNemar's test compares paired dichotomous variables.": PRINT
  93. 390  PRINT "[MHCHIMLT]:  Mantel-Haenszel Chi-square for multiple controls compares": PRINT TAB(14);"dichotomous variables with several controls per case.":PRINT
  94. 400  PRINT:PRINT:PRINT: PRINT TAB(20);"Press any key to return to menu:": PRINT
  95. 405  A$=INKEY$: IF A$="" THEN 405 ELSE 225
  96. 410  CLS: PRINT TAB(20);"NORMALLY DISTRIBUTED INDEPENDENT SAMPLES": PRINT
  97. 415  PRINT TAB(8);: INPUT "Do you want to analyze TWO (T) or MORE THAN TWO (M) samples?   ",A$
  98. 420  IF A$="t" OR A$="T" THEN 450 ELSE IF A$="M" OR A$="m" THEN 425 ELSE BEEP: GOTO 415
  99. 425  PRINT: PRINT: PRINT: PRINT "[ANOVA] :    ONE-WAY Analysis of Variance compares the means of": PRINT TAB(14);"3 or more samples."
  100. 430  PRINT TAB(14);"TWO-WAY Analysis of Variance evaluates the combined effects":PRINT TAB(14);"of 2 variables on a third variable.": PRINT
  101. 440  PRINT: PRINT: PRINT TAB(20);"Press any key to return to menu:"
  102. 445  A$=INKEY$: IF A$="" THEN 445 ELSE 225
  103. 450  PRINT: PRINT: PRINT: PRINT "[T-TEST] :   The unpaired T-Test compares the means of continuous variables.": PRINT
  104. 455  PRINT "[FISHERS] :  Fisher's Exact Test compares dichotomous variables.": PRINT
  105. 460  PRINT "[CHISQR] :   Chi-square Test compares discrete variables when": PRINT TAB(14);"the expected value for each cell is > 5.": PRINT
  106. 465  PRINT "[MHCHISQR] : Mantel-Haenszel Chi-square Test compares a dichotomous": PRINT TAB(14);"variable while controlling for another factor.": PRINT
  107. 470  PRINT: PRINT: PRINT TAB(20);"Press any key to return to menu:"
  108. 475  A$=INKEY$: IF A$="" THEN 475 ELSE 225
  109. 480  CLS: PRINT TAB(23);"OTHER STATISTICAL FUNCTIONS": PRINT: PRINT
  110. 485  PRINT "[BAYES] :    Bayes theorem evaluates the predictive power of a": PRINT TAB(14);"diagnostic test or variable.": PRINT
  111. 488  PRINT "[HISTOGRM] : Graphs a histogram of sample data either on screen": PRINT TAB(14);"or on printer.": PRINT
  112. 490  PRINT "[NORMAL] :   The Normal distribution calculates the percent of": PRINT TAB(14);"test values expected to fall within a given range.": PRINT
  113. 495  PRINT "[RATEADJ] :  Direct and indirect rate adjustments are performed to": PRINT TAB(14);"make a sample comparable to a standard.": PRINT
  114. 500  PRINT "[SAMPLSIZ] : Calculates the appropriate sample sizes for surveys,": PRINT TAB(14);"paired and unpaired studies.": PRINT
  115. 505  PRINT "[RANDOMIZ] : Selects a random sample for survey or study.": PRINT
  116. 510  PRINT: PRINT TAB(17);"Press any key to return to main menu:"
  117. 515  A$=INKEY$: IF A$="" THEN 515 ELSE 50
  118. 520  CLS: PRINT TAB(20);"RUNNING EPISTAT STATISTICAL PROGRAMS"
  119. 522  PRINT TAB(20);STRING$(36,205): PRINT: PRINT
  120. 525  PRINT TAB(3);"Determine the program name (PROGNAME) from Section 1 or 2, then enter: "
  121. 530  PRINT: PRINT TAB(30);"RUN ";CHR$(34);"PROGNAME";CHR$(34): PRINT: PRINT
  122. 535  PRINT "For 10 common programs, use the FUNCTION KEYS defined below:": PRINT
  123. 540  KEY 1,"RUN "+CHR$(34)+"DATA-ONE"+CHR$(34): KEY 2,"RUN "+CHR$(34)+"ANOVA"+CHR$(34)
  124. 545  KEY 3,"RUN "+CHR$(34)+"BINOMIAL"+CHR$(34): KEY 4,"RUN "+CHR$(34)+"CHISQR"+CHR$(34)
  125. 550  KEY 5,"RUN "+CHR$(34)+"FISHERS"+CHR$(34): KEY 6,"RUN "+CHR$(34)+"LNREGRES"+CHR$(34)
  126. 555  KEY 7,"RUN "+CHR$(34)+"NORMAL"+CHR$(34): KEY 8,"RUN "+CHR$(34)+"POISSON"+CHR$(34)
  127. 560  KEY 9,"RUN "+CHR$(34)+"RANKTEST"+CHR$(34): KEY 10,"RUN "+CHR$(34)+"T-TEST"+CHR$(34)
  128. 570  KEY LIST: PRINT TAB(22);: COLOR 0,7: PRINT "    GOOD LUCK WITH EPISTAT    ": COLOR 7,0
  129. 575  END
  130.